Basic Programming Concepts
Last reviewed 25 Jan 2021 by Crispin Read
Description
This session will introduce the learners to Javascript. They will learn about variables/ data types, the console and arithmetic operators
Why this is important
This session will show the learners how to lay out their code and structure simple functional programmes. The purpose of this lesson is to help the learners understand how to think like a programmer/ talk to a computer.
Outcomes
Following this training you will be able to: Create very basic procedural code and explain the differences between the different data types and arithmetic operators available.
Learner Requirements
VS code
Github desktop
Outline
- What is Javascript?
- What can you do with Javascript
- How to apply Javascript to your website code
- Output methods
- Variables, Data types and Mathematical operators
- Task
Tasks
Mandatory
1 We’ll make a program to calculate a tip
- Create variables for the pre-tip total and the tip percentage
- Calculate the new total
- Output a sentence to the page - something like:
Your total bill, with tip, is £35.45
BONUS POINTS:
- Use toFixed() to round the output to 2 decimal places
- Display the tip amount in the output as well
2 Extend the Tip program
- Create variables for the pre-tip total and the tip percentage
- Calculate the new total
- Output a sentence to the page - something like:
“Your total bill, with tip, is £35.45”
Extension: round the figure to 2 DP and display the tip amount.
Additional
Make a Procedural Function in Javascript.
Resources / Reference
N/A
Skills, Knowledge, Behaviours and Values
Core Skills
This workshop is designed to develop the following from our core skills directive
- Presentation
- Logic
- Problem Solving
- Reflection
- Research
- Learning from failure
Apprenticeship Standard
This workshop will encourage the development of the following from the Software Developer Level 4 Standard
COMPETENCIES (Skills)
- C1 - Logic: writes good quality code (logic) with sound syntax in at least one language.
- C5 - Problem solving: can apply structured techniques to problem solving, can debug code and can understand the structure of programmes in order to identify and resolve issues.
- C8 - Deployment: can understand and utilise skills to build, manage and deploy code into enterprise environments.
- C9 - Development lifecycle: can operate at all stages of the software development lifecycle, with increasing breadth and depth over time with initial focus on build and test..
- C12 - Can respond to the business environment and business issues related to software development.
BEHAVIOURS
- B1 - Logical and creative thinking skills.
- B2 - Analytical and problem-solving skills.
- B3 - Ability to work independently and to take responsibility.
- B7 - Ability to communicate effectively in a variety of situations.
- B8 - Maintain productive, professional and secure working environment.
Knowledge
- K1 - Understands and operates at all stages of the software development lifecycle.
- K3 - Understands how teams work effectively to produce software and contributes appropriately.
- K4 - Understands and applies software design approaches and patterns and can interpret and implement a given design, compliant with security and maintainability requirements.
- K5 - Understands and responds to the business environment and business issues related to software development.